﻿using System;
using System.Collections;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Services;
using System.Web.Services.Protocols;
using System.Xml.Linq;

namespace YXShop.Web.filehandle
{
    /// <summary>
    /// $codebehindclassname$ 的摘要说明
    /// </summary>
    [WebService(Namespace = "http://tempuri.org/")]
    [WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
    public class auction_convert_orders : IHttpHandler
    {

        public void ProcessRequest(HttpContext context)
        {
            //int AuctionBidId = ChangeHope.WebPage.PageRequest.GetQueryInt("AuctionBidId");
            //if (AuctionBidId > 0)
            //{
            //    YXShop.BLL.Product.Product_Auction_Bid pabbll = new YXShop.BLL.Product.Product_Auction_Bid();
            //    YXShop.Model.Product.Product_Auction_Bid pabmodel = pabbll.GetModel(AuctionBidId);
            //    if (pabmodel != null)
            //    {
            //        YXShop.BLL.Member.MemberInfo mibll = new YXShop.BLL.Member.MemberInfo();

            //        if (HttpContext.Current.Session["MemberID"] != null)
            //        {
            //            uid = Convert.ToInt32(HttpContext.Current.Session["MemberID"]);
            //        }
            //        YXShop.Model.Member.MemberInfo mimodel = mibll.GetModel(uid);
            //        string UID = string.Empty;
            //        string UserName = string.Empty;
            //        string AddressInfo = string.Empty;
            //        string Tel = string.Empty;
            //        string Fax = string.Empty;
            //        string post = string.Empty;
            //        string MobilePhone = string.Empty;
            //        string Email = string.Empty;
            //        string Province = string.Empty;
            //        string City = string.Empty;
            //        string Borough = string.Empty;
            //        if (mimodel != null)
            //        {
            //            UID = mimodel.UID.ToString();
            //            UserName = mimodel.TrueName;
            //            AddressInfo = mimodel.Address;
            //            Tel = mimodel.HomePhone;
            //            Fax = mimodel.Fax;
            //            post = mimodel.Zip;
            //            MobilePhone = mimodel.MobilePhone;
            //            Email = mimodel.MSN;
            //            Province = mimodel.Province;
            //            City = mimodel.City;
            //            Borough = mimodel.Borough;
            //        }
            //        YXShop.BLL.Member.ReceAddress rabll = new YXShop.BLL.Member.ReceAddress();
            //        if (uid != 0)
            //        {
            //            ChangeHope.DataBase.DataByPage db = rabll.GetList(" uid=" + uid + " and stat=1");
            //            if (db.DataReader != null)
            //            {
            //                while (db.DataReader.Read())
            //                {
            //                    UID = db.DataReader["uid"].ToString();
            //                    UserName = db.DataReader["username"].ToString();
            //                    AddressInfo = db.DataReader["address"].ToString();
            //                    Tel = db.DataReader["phone"].ToString();
            //                    Fax = db.DataReader["fax"].ToString();
            //                    post = db.DataReader["zip"].ToString();
            //                    MobilePhone = db.DataReader["mobile"].ToString();
            //                    Email = db.DataReader["email"].ToString();
            //                    Province = db.DataReader["province"].ToString();
            //                    City = db.DataReader["city"].ToString();
            //                    Borough = db.DataReader["borough"].ToString();
            //                }
            //            }
            //        }
            //        YXShop.BLL.Order.Orders bll = new YXShop.BLL.Order.Orders();
            //        YXShop.Model.Order.Orders model = new YXShop.Model.Order.Orders();

            //    }
            //    else
            //    {
            //        ChangeHope.WebPage.Script.AlertAndGoBack("拍卖转成订单失败!\n原因:可能拍卖出价信息不存在.");
            //    }
            //}
            //else
            //{
            //    ChangeHope.WebPage.Script.AlertAndGoBack("拍卖转成订单失败!");
            //}
            context.Response.ContentType = "text/plain";
            context.Response.Write("Hello World");
        }

        public bool IsReusable
        {
            get
            {
                return false;
            }
        }
    }
}
